package com.wushi.lenovo.asia5b.app_model.good;

import com.mvp.base.model.BaseModel;
import com.wushi.lenovo.asia5b.R;

/**
 * Created by zhangyuncai on 2019/3/16.
 */
public class ThridMallModel extends BaseModel {
    private static final String TAG_TAOBAO = "taobao";
    private static final String TAG_TMALL = "tmall";
    private static final String TAG_JD = "jd";
    private static final String TAG_1688 = "1688";
    private static final String TAG_PINGDUODUO = "pinduoduo";
    private static final String TAG_MOGUJIE = "mogujie";
    private static final String TAG_YIWUGOU = "yiwugou";
    private int imgRes;
    private int url;
    private String title;
    private String source;

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public void initOtherValue() {
        switch (source) {
            case TAG_TAOBAO:
                title = "Taobao";
                imgRes = R.drawable.ic_thirdmall_taobao;
                url=R.string.thirdmall_url_taobao;
                break;
            case TAG_TMALL:
                title = "TMall";
                imgRes = R.drawable.ic_thirdmall_tianmao;
                url=R.string.thirdmall_url_tianmao;
                break;
            case TAG_JD:
                title = "JD";
                imgRes = R.drawable.ic_thirdmall_jd;
                url=R.string.thirdmall_url_jd;
                break;
            case TAG_1688:
                title = "1688";
                imgRes = R.drawable.ic_thirdmall_1688;
                url=R.string.thirdmall_url_1688;
                break;
            case TAG_PINGDUODUO:
                title = "Ping Duo Duo";
                imgRes = R.drawable.ic_thirdmall_pinduoduo;
                url=R.string.thirdmall_url_pinduoduo;
                break;
            case TAG_MOGUJIE:
                title = "Mogujie";
                imgRes = R.drawable.ic_thirdmall_mogu;
                url=R.string.thirdmall_url_mogu;
                break;
            case TAG_YIWUGOU:
                title = "Yiwugou";
                imgRes = R.drawable.ic_thirdmall_yiwu;
                url=R.string.thirdmall_url_yiwu;
                break;
        }
    }

    public String getTitle() {
        return title;
    }

    public int getImgRes() {
        return imgRes;
    }

    public int getUrl() {
        return url;
    }
}
